import Vue from 'vue'
import { getAction } from '@/api/manage'

export const HomeDataMixin = {
  data(){
    return {
      /* 基础展示信息 */
      basicData: []
    }
  },
  mounted(){
    this.loadBasic()
  },
  methods: {
    loadBasic(){
      getAction(this.url.cattleExist).then((res) => {
        // console.log("res", res)
        if(res.success){
          this.basicData = res.result.records || res.result;
        }
        if(res.code===510){
          this.$message.warning(res.message)
        }
        // this.loading = false;
      })
    },
  }
}